/*
 * Copyright 2001 Alexander Boverman and the original authors.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef _WT_WEB_ERRORS
#define _WT_WEB_ERRORS

#include "WtContext.h"

int WtHandleErrors(WtContext *w, Tcl_Interp *interp, request_rec *r,
  int useScripts, int *sendStatus);
int WtPrintError(const char *msg, Tcl_Obj *destString);
int WtPrintErrorNotices(WtContext *w, Tcl_Obj *destString, Tcl_Interp *interp);
int WtPrintErrorFmt(char *file, int line, Tcl_Obj *destString,
  WtContext *w, request_rec *apReq, const char *fmt, ...);
int WtPrintInitError(char *file, int line, int mask,
  request_rec *apReq, int sendHeadersAndFlush, const char *fmt, ...);
int WtInterpError(const char *file, int line, WtContext *w,
  Tcl_Interp *interp);
int WtHandleErrorsNs(WtContext *w);
int WtHandleErrorsCmd(ClientData clientData, Tcl_Interp *interp,
  int objc, Tcl_Obj *const objv[]);
int WtStartErrors(WtContext *w, Tcl_Interp *interp, int *errorSetId);
int WtStopErrors(WtContext *w, Tcl_Interp *interp, int errorSetId,
  int setResult);
int WtAddEvalError(Tcl_Interp *interp, WtContext *w);
int WtAddInterpError(Tcl_Interp *interp, WtContext *w);
int WtAddInterpErrorInternal(Tcl_Interp *interp, WtContext *w,
  int useErrorInfo);
int WtAddError(Tcl_Obj *errorCode, Tcl_Obj *errorInfo, Tcl_Interp *interp,
  WtContext *w);
int WtDeleteErrors(WtContext *w, Tcl_Interp *interp);

#endif /* ! _WT_WEB_ERRORS */
